#include <iostream>
#include <exception>
//#include <stdexcept>
using std::exception;
using std::runtime_error;
using namespace std;

void function1();
void function2();
void function3();

void function1()
{
	function2();
} 
void function2()
{
	function3();
}
void function3()
{
	throw runtime_error("runtime error is function3");
}
int main(void)
{
	try
	{
		function1();
	}
	catch(runtime_error &error)
	{
		cout << "I catch it." << "\n";
	}
	cout << "I did not catch it." << "\n";

	return 0;
}
